package controller.design_mode_05_mediator;

/**
 * ***********************************************************
 *
 * @类名 : controller.design_mode_05_mediator.类名
 * @DESCRIPTION : 通用抽象中介者
 * @AUTHOR :  一个风情万种的男子
 * @DATE : 2016/4/18
 * ***********************************************************
 */
public abstract class Mediator {
    //定义同事类
    protected ConFriend1 c1 ;
    protected ConFriend2 c2 ;

    //中介者模式的业务逻辑
    public abstract void doSomething1();
    public abstract void doSomething2();

    //通过getter/setter 方法注入同事类
    public ConFriend1 getC1() {
        return c1;
    }

    public void setC1(ConFriend1 c1) {
        this.c1 = c1;
    }

    public ConFriend2 getC2() {
        return c2;
    }

    public void setC2(ConFriend2 c2) {
        this.c2 = c2;
    }
}
